<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>三元运算符</title>
	</head>
	<body>
		<script type="text/javascript">
			var  a=12;
			//布尔表达式?表达式1:表达式2;
			a==11?document.write("对"):document.write("错");
		</script>
	</body>
</html>
